/*!
 * 文件名称： bsp_can.h
 * 描    述： bsp can interface
 * 版本：     2023-12-03, V1.0
*/

/*
* GD32F303东方红开发板V1.0
* 淘宝商城：   https://juwo.taobao.com
* 技术交流：   https://www.gd32bbs.com/ask/
* 视频学习：   https://space.bilibili.com/475462605
* 微信公众号： gd32bbs
* Copyright    苏州聚沃电子科技有限公司
* 版权所有，盗版必究。
*/
#ifndef BSP_CAN_H
#define BSP_CAN_H
#include "driver_public.h"
#include "driver_can.h"

extern typdef_can_general BSP_CAN;
extern can_trasnmit_message_struct bsp_can_transmit_message_1;
extern can_trasnmit_message_struct bsp_can_transmit_message_2;
extern can_trasnmit_message_struct bsp_can_transmit_message_3;

extern can_receive_message_struct can0_receive_message_fifo0;
extern FlagStatus can0_receive_fifo0_flag;
extern can_receive_message_struct can0_receive_message_fifo1;
extern FlagStatus can0_receive_fifo1_flag;

void bsp_can_config(typdef_can_general can_general);
void bsp_can_transmit(typdef_can_general can_general,can_trasnmit_message_struct *transmit_message);
void can0_rx1_interrupt_handler(void);
void can0_rx0_interrupt_handler(void);




#endif /* BSP_CAN_H*/
